<?php

namespace App\Models;

use Illuminate\Foundation\Auth\User as AuthAdmin;
use Illuminate\Database\Eloquent\SoftDeletes;
//自定义按钮 trait
use App\Models\Traits\Btn;

class Admin extends AuthAdmin
{
    //
    use SoftDeletes,Btn;
    protected $dates = ['deleted_at'];
    protected $guarded = [];

    //隐藏字段
    protected $hidden = ['password'];

    // 角色属于
    public function role() {
        return $this->belongsTo(Role::class,'role_id');
    }
}
